home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / novell / nw386 / secure-5.386 < prev    next >
Text File  |  1996-07-10  |  17KB  |  498 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. Chapter 5
  12. File and Directory Security
  13.  
  14.  
  15.  
  16. This chapter illustrates the changes and capabilities
  17. that NetWare 386 brings to NetWare file and directory
  18. security. (Login security is discussed in Chapter 6,
  19. Bindery.)  This chapter includes the following sections:
  20.  
  21.    ■ File/Directory Attributes
  22.    ■ Byte Field
  23.    ■ Trustee Rights
  24.  
  25.  
  26.  
  27.  
  28. File/Directory Attributes
  29.  
  30. Attributes assign special properties to files and
  31. directories that override rights, thus preventing tasks
  32. that effective rights allow. Attributes can be used to
  33. restrict or inhibit copying, deleting, renaming, viewing,
  34. writing, and sharing. Attributes can be assigned to files
  35. and directories as shown in the following graphic.
  36.  
  37. -------------------------------------------------------
  38. FILE/DIRECTORY ATTRIBUTES
  39.  
  40. File Attributes-
  41.  
  42. Archive Needed
  43. Copy Inhibit
  44. Delete Inhibit
  45. Execute Only
  46. Hidden
  47. Indexed
  48. Purge
  49. Read Audit
  50. Read Only/Read Write
  51. Rename Inhibit
  52. Shareable
  53. System
  54. Transactional
  55. Write Audit
  56.  
  57. Directory Attributes-
  58.  
  59. Delete Inhibit
  60. Hidden
  61. Purge
  62. Rename Inhibit
  63. System
  64.  
  65. -------------------------------------------------------
  66.  
  67.                                              
  68. Archive Needed
  69.  
  70. The Archive Needed attribute can be assigned only to
  71. files. NetWare automatically assigns this attribute to
  72. any file that is modified after the last backup. This
  73. attribute is DOS's Archive bit. Copy Inhibit
  74.  
  75. The Copy Inhibit attribute can be assigned only to files.
  76. This attribute restricts only the copy rights of certain
  77. applications, such as the Macintosh Finder. Even if users
  78. have been granted Read and File Scan rights at the
  79. directory or file level, they will not be able to copy
  80. the file.
  81.  
  82. If users have been granted the Modify right, they can
  83. remove the Copy Inhibit attribute and then copy the file.
  84.  
  85. Delete Inhibit
  86.  
  87. The Delete Inhibit attribute can be assigned to
  88. directories and files. This attribute prevents users from
  89. erasing the directories or files even when they have been
  90. granted the Erase right at the file or directory level.
  91.  
  92. If users have been granted the Modify right, they can
  93. remove the Delete Inhibit attribute and delete the file
  94. or directory.
  95.  
  96. Execute Only
  97.  
  98. The Execute Only attribute can be assigned only to files.
  99. This attribute prevents files from being copied. Only the
  100. Supervisor can assign this file attribute, and it should
  101. be assigned only if a backup copy of the file exists.
  102. Backup utilities will not back up the files. Some
  103. programs will not execute properly when they are flagged
  104. Execute Only.
  105.  
  106. Hidden 
  107.  
  108. The Hidden attribute can be assigned to directories and
  109. files. This attribute hides the file or directory from
  110. DOS DIR scans and prevents it from being deleted or
  111. copied. However, the files and directories will appear
  112. with a NetWare NDIR scan if the user has File Scan
  113. rights.
  114.  
  115. Purge
  116.  
  117. The Purge attribute can be assigned to directories and
  118. files. When assigned to a file, this attribute purges the
  119. file as soon as it is deleted.  When assigned to a
  120. directory, this attribute purges all files in the
  121. directory when they are deleted. Such files cannot be
  122. recovered with the SALVAGE utility. Read Audit
  123.  
  124. The Read Audit attribute will be available with NetWare
  125. 386 v3.1. The Read Audit attribute can be assigned only
  126. to files.
  127.  
  128. Read Only/Read Write
  129.  
  130. The Read Only attribute can be assigned only to files.
  131. When Read Only is assigned, NetWare automatically assigns
  132. the Delete Inhibit and Rename Inhibit attributes as well.
  133. Consequently, users cannot write to, erase, or rename the
  134. file even if they have been granted the Write and Erase
  135. rights at the directory or file level. 
  136.  
  137. If users have the Modify right, they can remove the Read
  138. Only attribute and then write to, rename, or erase the
  139. file. (Removing Read Only automatically removes Delete
  140. Inhibit and Rename Inhibit.)  If users with the Modify
  141. right remove the Delete Inhibit and Rename Inhibit
  142. attributes separately, they can delete or rename the
  143. file, but they can't write to it.
  144.  
  145. Rename Inhibit
  146.  
  147. The Rename Inhibit attribute can be assigned to
  148. directories and files. This attribute restricts users
  149. from renaming directories and files even if they have
  150. the Modify right. If they have the Modify right, they
  151. must remove the Rename Inhibit attribute before renaming
  152. the file or directory.
  153.  
  154. Shareable
  155.  
  156. The Shareable attribute can be assigned only to files.
  157. This attribute allows the file to be used by more than
  158. one user at a time and is usually used in combination
  159. with the Read Only attribute.
  160.  
  161. System
  162.  
  163. The System attribute can be assigned to directories and
  164. files. It hides the file or directory from DOS DIR scans.
  165. However, the files and directories will appear with an
  166. NDIR scan if the user has File Scan rights. Transactional
  167.  
  168. The Transactional attribute can be assigned only to
  169. files. This attribute indicates that files will be
  170. protected by TTS (Transaction Tracking System). TTS
  171. ensures that, when a file is being modified, either all
  172. changes are made, or no changes are made, thus preventing
  173. data corruption. If you are using TTS, all database files
  174. that you want protected need to be flagged with the
  175. Transactional attribute.
  176.  
  177. Write Audit
  178.  
  179. The Write Audit attribute is not available with NetWare
  180. 386 v3.0, but will be available with v3.1. The Write
  181. Audit attribute can be assigned only to files.
  182.  
  183. Byte Field
  184.  
  185. File and directory attributes appear in a 4-byte field
  186. within the file's DOS file entry stored in the volume's
  187. Directory Table. Directory attributes also appear in a
  188. 4-byte field within the directory's DOS directory entry.
  189. The following bits are defined for file and directory
  190. attributes:
  191.  
  192.  
  193. Directory and File Attributes
  194.  
  195. Byte 3    Byte 2    Byte 1    Byte 0
  196.  
  197. 76543210  76543210 76543210 76543210
  198. ........  ........ ........ .......1 Read Only/Read Write
  199. ........  ........ ........ ......1. Hidden 
  200. ........  ........ ........ .....1.. System 
  201. ........  ........ ........ ....1... Execute Only
  202. ........  ........ ........ ..1..... Archive Needed
  203. ........  ........ ........ 1....... Shareable
  204. ........  ........ ...1.... ........ Transactional 
  205. ........  ......1. ........ ........ Read Audit
  206. ........  .....1.. ........ ........ Write Audit
  207. ........  ........ ..1..... ........ Purge
  208. ........  ........ ....1... ........ Copy Inhibit
  209. ........  ........ .1...... ........ Rename Inhibit
  210. ........  ........ 1....... ........ Delete Inhibit
  211.  
  212. Note that the Indexed file attribute is no longer
  213. supported since all files are automatically turbo FAT
  214. indexed when they have 64 or more regular FAT entries and
  215. are randomly accessed. However, the Indexed bit can still
  216. be set or cleared because some applications may need to
  217. have this bit set.
  218.  
  219. Trustee Rights
  220.  
  221. Trustee Rights control a user's or trustee's ability to
  222. access and work within a network's directories,
  223. subdirectories, and files. NetWare 386 includes a
  224. modified system of rights. The system differs from the
  225. systems in previous versions of NetWare in the following
  226. ways:
  227.  
  228.    ■ The Maximum Rights Mask has been discarded.
  229.  
  230.    ■ The Inherited Rights Mask (similar in some ways to
  231.      a Maximum Rights Mask) has been added.
  232.  
  233.    ■ A directory has an Inherited Rights Mask and
  234.      (optionally) a Trustee List. This is similar to the
  235.      systems in previous version of NetWare. However,
  236.      unlike previous versions of NetWare, a file also
  237.      has an Inherited Rights Mask and, optionally, a
  238.      Trustee List.
  239.  
  240.    ■ A Supervisor trustee right has been added.
  241.  
  242.    ■ The Open file right has been discarded.
  243.  
  244. NetWare 386 Trustee Rights appear in a 2-byte format as
  245. follows:
  246.  
  247. Trustee Rights
  248.  
  249. Byte 1    Byte 0
  250.  
  251. 76543210  76543210 
  252. ........  .......1 R Read
  253. ........  ......1. W Write
  254. ........  .....1.. undefined
  255. ........  ....1... C Create
  256. ........  ...1.... E Erase
  257. ........  ..1..... A Access Control
  258. ........  .1...... F File Scan
  259. ........  1....... M Modify
  260. .......1  ........ S Supervisor
  261.  
  262. For comparison, Trustee Rights appear as follows in
  263. previous versions of NetWare:
  264.  
  265. Trustee Rights
  266.  
  267. Byte 1    Byte 0
  268.  
  269. 76543210  76543210 
  270. ........  .......1 R Read
  271. ........  ......1. W Write
  272. ........  .....1.. O Open
  273. ........  ....1... C Create
  274. ........  ...1.... D Delete
  275. ........  ..1..... P Parental
  276. ........  .1...... S Search
  277. ........  1....... M Modify
  278.  
  279.  
  280. Example of Trustee Rights
  281.  
  282. An example illustrates the new trustee rights system.
  283. Consider the following hypothetical directory structure
  284. of volume WORK.
  285.  
  286.  
  287.  
  288.                           |---> File_1
  289.                           |    
  290.                           |---> File_2      
  291.              |--->PROJECT-
  292.              |            |---> File_3    
  293.              |            |
  294.              |            |           |--> File_4
  295.              |            |-->STUFF --|        
  296.         WORK-                         |--> File_5  
  297.              | 
  298.              |     
  299.              |--->PROGRAMS
  300.  
  301.  
  302.  
  303.  
  304. WORK is the root directory and
  305. the volume name. Two entries appear under the root
  306. directory: two subdirectories called PROJECT and
  307. PROGRAMS. Four entries appear under PROJECT:  three files called
  308. File_1, File_2, File_3; and a subdirectory called STUFF.
  309. Finally, two entries appear under STUFF:  two files
  310. called File_4 and File_5.
  311.  
  312. Root Directory
  313.  
  314. WORK does have at least one trustee:  JAN. As you can see
  315. below, JAN has been granted all rights to directory WORK.
  316.  
  317.    JAN's Rights to Directory WORK
  318.  
  319.    ■ R  (Read the file)
  320.  
  321.    ■ W  (Write to the file)
  322.  
  323.    ■ C  (Create files under directory work)
  324.  
  325.    ■ E  (Erase the file)
  326.  
  327.    ■ A  (Access and modify Inherited Rights Mask and
  328.         Trustee List)
  329.  
  330.    ■ F  (File Scan)
  331.  
  332.    ■ M  (Modify attributes and rename files)
  333.  
  334. However, this does not mean that JAN has all rights to
  335. every entry in WORK. For example, even though JAN was
  336. granted all rights in WORK, JAN does not have all rights
  337. to directory PROJECT.
  338.  
  339. Inherited Rights Mask
  340.  
  341. This is because directory PROJECT's Inherited Rights Mask
  342. as shown below has excluded all but two of the rights
  343. that JAN has to directory WORK.
  344.  
  345.    JAN's Rights to Directory PROJECT,
  346.    Determined by Inherited Rights Mask  
  347.  
  348.    ■ R  (Read the file)
  349.  
  350.    ■ F  (File Scan) The Inherited Rights Mask represents the rights that any
  351.         of a directory's or file's trustees can inherit from a
  352.         parent directory. Thus, as a trustee to PROJECT, JAN does
  353.         not inherit rights held as a trustee to the parent
  354.         directory WORK. In essence, PROJECT's Inherited Rights
  355.         Mask says, "No matter what trustee rights you have in the
  356.         parent directory, these are the only trustee rights you
  357.         can retain for this directory and for all
  358.         subdirectories."  (Note that since a root directory does
  359.         not have a parent directory, WORK, like all root
  360.         directories, does not have an Inherited Rights Mask.)
  361.  
  362. Directory PROJECT's Inherited Rights Mask allows JAN and
  363. other Trustees to scan for directory STUFF, and to scan
  364. for, open, and read the three files under directory
  365. PROJECT. JAN could do all these things, except that the
  366. files in directory PROJECT also have Inherited Rights
  367. Masks that determine what JAN can and cannot do in
  368. directory PROJECT. If the Inherited Rights Mask of the
  369. three files, File_1, File_2, and File_3, do not allow it,
  370. JAN has no rights to scan for, open, or read those files.
  371.  
  372. So, even though JAN has File scan (F) rights in directory
  373. PROJECT, JAN still cannot see (with an NDIR command, for
  374. example) File_1. In fact, the Inherited Rights Mask of
  375. File_1 could prevent any trustee from having rights to
  376. the file. In that case, only a supervisor could see this
  377. file.
  378.  
  379. Rights Granted by Supervisor
  380.  
  381. However, there is a way to get around the Inherited
  382. Rights Mask. Like File_1, File_2's Inherited Rights Mask
  383. does not allow the inheritance of trustee rights. Thus,
  384. if JAN had to rely solely on the Trustee Rights granted
  385. in directory PROJECT, JAN would have no rights to File_2.
  386. But because the supervisor can grant rights to JAN at the
  387. file level, JAN has the rights to File_2 as shown in the
  388. following.
  389.  
  390.    JAN's Rights to File_2, Granted by
  391.    Supervisor at File Level  
  392.  
  393.    ■ R  (Read the file)
  394.  
  395.    ■ W  (Write to the file)
  396.  
  397.    ■ E  (Erase the file)
  398.  
  399.    ■ A  (Access and modify File_2's Inherited Rights Mask
  400.         and Trustee List JAN's Rights to File_2, Granted by
  401.    Supervisor at File Level (continued)
  402.  
  403.    ■ F  (Scan for File_2)
  404.  
  405.    ■ M  (Modify File_2's attributes and rename the file).
  406.         
  407.  
  408. Description of Trustee Rights
  409.  
  410. The following is a description of each trustee right.
  411.  
  412. Right        Assigned to a Directory Trustee    Assigned
  413.                                                 to a File
  414.                                                 Trustee
  415.  
  416. Read         User can open and read existing    User can
  417.                                                 open and
  418.              files in this directory unless     read this
  419.                                                 file.
  420.              blocked by mask or trustee rights
  421.              assignment.
  422.  
  423.    
  424. Write        User can open and write to         User can
  425.                                                 open and
  426.              files in this directory unless     write to
  427.                                                 this file.
  428.              blocked by mask or trustee rights
  429.              assignment.
  430.  
  431.    
  432. Create       User can create files and          User can
  433.                                                 salvage
  434.                                                 this
  435.              subdirectories in this directory.  file
  436.                                                 if it
  437.                                                 is
  438.                                                 deleted.
  439.  
  440.  
  441. Erase        User can delete this directory     User
  442.                                                 can
  443.                                                 delete
  444.                                                 this
  445.              if the user has rights to delete   file.
  446.              everything inside it.
  447.  
  448. Access       User can modify the trustee list   User can modify this
  449. Control      and Inherited Rights Mask of this  file's
  450.                                                 Trustee
  451.                                                 List
  452.              directory.                         and Inherited
  453.                                                 Rights
  454.                                                 Mask.  
  455.  
  456. File Scan    User can see the names of files    User can
  457.                                                 see the
  458.                                                 name
  459.              in this directory when scanning    of this file
  460.                                                 when 
  461.              the directory (e.g., NDIR) unless  scanning
  462.                                                 the
  463.                                                 directo
  464.                                                 ry.
  465.              blocked by mask or trustee rights 
  466.              assignment. Right        Assigned to a Directory Trustee    Assigned
  467.                                                 to a File
  468.                                                 Trustee
  469.  
  470. Modify       User can rename this directory     User
  471.                                                 can
  472.                                                 rename
  473.                                                 this
  474.              and change the attributes of it.   file and
  475.                                                 change its
  476.                                                 attributes. 
  477.  
  478. Supervisor   User has all rights to this        User has
  479.                                                 all
  480.                                                 rights to
  481.              directory and all subdirectories   this file.
  482.              and files. User can grant
  483.              supervisor rights to other users
  484.              in this directory and in 
  485.              subdirectories and files. User's
  486.              rights override all Inherited 
  487.              Rights Masks in subdirectories
  488.              and files. User can assign space
  489.              limitations to subdirectories
  490.  
  491.  
  492. Note that in addition to trustee rights, NetWare 386
  493. features other file system security as well. Supervisors
  494. can limit user disk space for each volume. A supervisor
  495. can also limit the cumulative amount of disk space
  496. allotted to a directory and all child subdirectories and
  497. files.
  498.